/*
 * Photo.h
 *
 *  Created on: 15-Oct-2009
 *      Author: pmui
 */

#ifndef Photo_H_
#define Photo_H_

#include <QtCore>
#include <QStringList>
#include <QObject>
#include <QDir>

class TwitPic;

class Photo : public QObject
{
	Q_OBJECT
	
public:
	Photo();

private:
	void getDirectory(QStringList &photos, const QString &dir);
	
signals:
	void uploadReady();
	void reload();
	
public slots:
	QStringList getAvailablePhotos();
	void uploadPhoto(const QString &photo);
	QByteArray getImageData(const QString &photo);
	
private slots:
	void doUploadReady();
	void doReload();
	
private:
	TwitPic *m_upload;
	QFileSystemWatcher *m_fsWatcher;
	QStringList m_photoDirs;
};

#endif /* Photo_H_ */
